<%@ page import="java.util.Map" %>
<%@ page import="java.util.HashMap" %><%--
  Created by IntelliJ IDEA.
  User: ZJM
  Date: 2024/4/16
  Time: 21:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--1.声明类属性--%>
<%!
  private String message = "Hello, World!";
  private static Map<String, Object> map;
%>
<%--2.声明静态代码块--%>
<%!
  static {
    System.out.println("Static block executed");
    map = new HashMap<>();
    map.put("username", "zjm");
  }
%>
<html>
<head>
  <title>Title</title>
</head>
<body>
<h1>表达式脚本</h1>
<div><%=12%>
</div>
<br>
<div><%=12.6%>
</div>
<br>
<div><%="zjm"%>
</div>
<br>
<div><%=message%>
</div>
<br>
<%=map%>
</body>
</html>
